
// import cookie from 'js-cookie'

/* 读取localStorage中的值 */
export function getItem(key:string){
    var value = localStorage.getItem(key);
    return value ? JSON.parse( value ) : null;
}
/* 写入值到localStorage */
export function setItem(key:string,value:any){
    localStorage.setItem(key,JSON.stringify( value ));
}

/* 封装针对cookie的读操作 */
// export function getCookie(key:string){
//     return cookie.get(key);
// }

/* 封装针对cookie的写操作 */
// export function setCookie(key:string,value:any){
//     return cookie.set(key,value);
// }